filename = 'learning_python.txt'
with open(filename) as file_object:
    print("The first printing:")
    message = file_object.read()
    print(message)
print()
with open(filename) as file_object:
    print('The second printing:')
    for line in file_object:
        print(line.rstrip())
with open(filename) as file_object:
    lines = file_object.readlines()
print()
print('The third printing:')
for line in lines:
    print(line.rstrip())
